<?php
/**
 * quick_curd
 * ============================================================================
 * 版权所有 2024-2099 wltx666.com，并保留所有权利。
 * 网站地址: https://wltx666.com
 * ============================================================================
 * Author: 草上飞
 * Email: wltx@alipay168.cn
 * QQ: 2719875001
 * Date: 2024/12/15
 * 描述:
 */
namespace app\admin\controller;

use app\result\UeditorResult;
use app\result\UploadResult;
use think\App;

/**
 * 上传
 */
class Upload extends BaseAdmin
{
    public function __construct(App $app)
    {
        parent::__construct($app);
        $this->objResult = new UploadResult();
    }

    //图片上传
    public function image()
    {
        data_exit_json($this->objResult->image($this->param));
    }

    //图片上传
    public function file()
    {
        data_exit_json($this->objResult->file($this->param));
    }

    /**
     * 文件分片上传
     * @return void
     */
    public function chunk()
    {
        data_exit_json($this->objResult->chunk($this->param));
    }

    public function list_group()
    {
        data_exit_json($this->objResult->list_group());
    }

    public function list()
    {
        data_exit_json($this->objResult->list($this->param));
    }

    public function get()
    {
        data_exit_json($this->objResult->get($this->param));
    }

    //删除
    public function del_data()
    {
        data_exit_json($this->objResult->del_data($this->param));
    }

    /**
     * 百度富文本编辑器TP版
     * @email wei@alipay168.cn
     * @author 小韦
     * @link http://blog.alipay168.cn
     * @Date: 2020/4/6 11:32
     */
    function ueditor()
    {
        data_exit_json((new UeditorResult())->ueditor($this->param));
    }

}
